<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="telephone=no" name="format-detection" />
    <title>我的佣金</title>
    <link href="{{asset('/mobile/css/main.css')}}" rel="stylesheet" type="text/css">
    <link href="{{asset('/mobile/css/style.css')}}" rel="stylesheet" type="text/css">
    <link href="{{asset('/mobile/css/shake.css')}}" rel="stylesheet" type="text/css">
    <link href="{{asset('/mobile/css/font-awesome.min.css')}}" rel="stylesheet" type="text/css">
    <link href="{{asset('/mobile/css/animate.min.css')}}" rel="stylesheet" type="text/css">
    <link href="{{asset('/mobile/css/idangerous.swiper.css')}}" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="{{asset('/mobile/js/jquery-1.8.3.min.js')}}"></script>
    <script type="text/javascript" src="{{asset('/mobile/js/wo.js')}}"></script>
</head>
<body>
<div class="warpe">
    <div class="pro_t">
        <p>佣金总额</p>
        <p><span>￥{{$agent->money}}</span></p>
        <p>累计提现：￥{{$agent->historyCash()}}</p>
        <p onclick="window.location.href='/mobile/agent/withdraw/{{$agent->id}}'"><i class="icon-plus"></i> 我要提现</p>
    </div>
    <div class="tabs my_tab">
        <a href="#" hidefocus="true" class="active">佣金来源</a>
        <a href="#" hidefocus="true">提现记录</a>
    </div>
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">
                <div class="content-slide">
                    <div class="I_list">
                        <ul>
                            @foreach($logs as $log)
                                <li class="animated fadeInRight">
                                    <a href="javascript:void(0)">
                                        <p>{{$log->created_at}}</p>
                                        <p><font>房卡返利 <b class="color_y"> ￥{{$log->fee}} </b>元</font></p>
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            </div>
            <div class="swiper-slide">
                <div class="content-slide">
                    <div class="I_list">
                        <ul>
                            @foreach($datas as $data)
                                <li class="animated fadeInRight">
                                    <a href="javascript:void(0)">
                                        <p>{!! str_limit($data->created_at, 16, '') !!}</p>
                                        <p><font>提现金额 <b class="color_y"> {{$data->money}} </b>元</font></p>
                                        @if($data->status == 0)
                                            <span class="color_y">审核中</span>
                                        @elseif($data->status == 1)
                                            <span class="color_g2">已到账</span>
                                        @else
                                            <span class="color_y">被驳回</span>
                                        @endif
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="{{asset('/mobile/js/idangerous.swiper.min.js')}}"></script>
<script type="text/javascript">
    var tabsSwiper = new Swiper('.swiper-container',{
        speed:500,
        onSlideChangeStart: function(){
            $(".tabs .active").removeClass('active');
            $(".tabs a").eq(tabsSwiper.activeIndex).addClass('active');
        }
    });
    $(".tabs a").on('touchstart mousedown',function(e){
        e.preventDefault()
        $(".tabs .active").removeClass('active')
        $(this).addClass('active')
        tabsSwiper.slideTo( $(this).index() )
    })
    $(".tabs a").click(function(e){
        e.preventDefault()
    })
</script>
</body>
</html>